var __defProp = Object.defineProperty;
var __typeError = (msg) => {
  throw TypeError(msg);
};
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
var _a, _mediapipe, _mediapipeDetect, _options, _TryOn_static, flipLandmarks_fn, loadMediapipe_fn, detect_fn;
import { M as Mediapipe } from "./chunk-mediapipe-C55qtWcT.js";
import "@mediapipe/tasks-vision";
import { S as SceneManager } from "./chunk-scene-B8BFA6Mr.js";
import { t as transformLandamks } from "./chunk-landmarks_helps-8DEkv_rO.js";
const _0x599bf2 = _0x31a8;
(function(_0x1b72a3, _0x4f7283) {
  const _0xc027b5 = { _0x1c2944: 414, _0x157cb0: 419, _0x397f66: 415, _0x2be083: 425, _0x196ec1: 421, _0x109129: 423, _0x25c5a3: 435, _0x5793d7: 426 }, _0x554077 = _0x31a8, _0x2cd476 = _0x1b72a3();
  while (!![]) {
    try {
      const _0x53d02f = parseInt(_0x554077(_0xc027b5._0x1c2944)) / 1 + -parseInt(_0x554077(416)) / 2 * (parseInt(_0x554077(_0xc027b5._0x157cb0)) / 3) + -parseInt(_0x554077(_0xc027b5._0x397f66)) / 4 + -parseInt(_0x554077(422)) / 5 * (-parseInt(_0x554077(_0xc027b5._0x2be083)) / 6) + -parseInt(_0x554077(_0xc027b5._0x196ec1)) / 7 * (-parseInt(_0x554077(_0xc027b5._0x109129)) / 8) + -parseInt(_0x554077(_0xc027b5._0x25c5a3)) / 9 + -parseInt(_0x554077(428)) / 10 * (-parseInt(_0x554077(_0xc027b5._0x5793d7)) / 11);
      if (_0x53d02f === _0x4f7283) break;
      else _0x2cd476["push"](_0x2cd476["shift"]());
    } catch (_0x101cc8) {
      _0x2cd476["push"](_0x2cd476["shift"]());
    }
  }
})(_0x2dc9, 282815);
const _0x4a06f7 = /* @__PURE__ */ function() {
  const _0x5bc62a = { _0x1d2db3: 433 };
  let _0x3637e9 = !![];
  return function(_0x106f6e, _0x12828a) {
    const _0x41532b = _0x3637e9 ? function() {
      const _0x1308f3 = _0x31a8;
      if (_0x12828a) {
        const _0x91b7da = _0x12828a[_0x1308f3(_0x5bc62a._0x1d2db3)](_0x106f6e, arguments);
        return _0x12828a = null, _0x91b7da;
      }
    } : function() {
    };
    return _0x3637e9 = ![], _0x41532b;
  };
}(), _0x222c38 = _0x4a06f7(void 0, function() {
  const _0x7ebe01 = { _0x3468fd: 434, _0xf08e89: 431, _0x1e29a4: 434, _0xf9697: 411, _0x29cd63: 436, _0x659352: 424 }, _0x1afc33 = _0x31a8, _0x2415d3 = function() {
    let _0x266fee;
    try {
      _0x266fee = Function('return (function() {}.constructor("return this")( ));')();
    } catch (_0xf260e1) {
      _0x266fee = window;
    }
    return _0x266fee;
  }, _0x420cec = _0x2415d3(), _0x6991ab = new RegExp("[NqOMTGLnNQMuQnGvyuLTWTeY]", "g"), _0x584732 = _0x1afc33(441)[_0x1afc33(424)](_0x6991ab, "")["split"](";");
  let _0x49abe6, _0x55e57f, _0x56eba9, _0x3b6260;
  const _0x5cee46 = function(_0x15bd45, _0x322950, _0x22087f) {
    const _0x2c69c7 = _0x1afc33;
    if (_0x15bd45[_0x2c69c7(431)] != _0x322950) return ![];
    for (let _0xeea37e = 0; _0xeea37e < _0x322950; _0xeea37e++) {
      for (let _0x489ab4 = 0; _0x489ab4 < _0x22087f["length"]; _0x489ab4 += 2) {
        if (_0xeea37e == _0x22087f[_0x489ab4] && _0x15bd45[_0x2c69c7(438)](_0xeea37e) != _0x22087f[_0x489ab4 + 1]) return ![];
      }
    }
    return !![];
  }, _0x55fc54 = function(_0x381455, _0x254139, _0x4df02a) {
    return _0x5cee46(_0x254139, _0x4df02a, _0x381455);
  }, _0x2a3d70 = function(_0xe1717, _0x468ca7, _0x1b827a) {
    return _0x55fc54(_0x468ca7, _0xe1717, _0x1b827a);
  }, _0x8ec217 = function(_0x5b8705, _0x1c4568, _0x13aa77) {
    return _0x2a3d70(_0x1c4568, _0x13aa77, _0x5b8705);
  };
  for (let _0x240839 in _0x420cec) {
    if (_0x5cee46(_0x240839, 8, [7, 116, 5, 101, 3, 117, 0, 100])) {
      _0x49abe6 = _0x240839;
      break;
    }
  }
  for (let _0x5ec23f in _0x420cec[_0x49abe6]) {
    if (_0x8ec217(6, _0x5ec23f, [5, 110, 0, 100])) {
      _0x55e57f = _0x5ec23f;
      break;
    }
  }
  for (let _0x1d556a in _0x420cec[_0x49abe6]) {
    if (_0x2a3d70(_0x1d556a, [7, 110, 0, 108], 8)) {
      _0x56eba9 = _0x1d556a;
      break;
    }
  }
  if (!("~" > _0x55e57f)) for (let _0x3cd708 in _0x420cec[_0x49abe6][_0x56eba9]) {
    if (_0x55fc54([7, 101, 0, 104], _0x3cd708, 8)) {
      _0x3b6260 = _0x3cd708;
      break;
    }
  }
  if (!_0x49abe6 || !_0x420cec[_0x49abe6]) return;
  const _0x4fdc3f = _0x420cec[_0x49abe6][_0x55e57f], _0x51f807 = !!_0x420cec[_0x49abe6][_0x56eba9] && _0x420cec[_0x49abe6][_0x56eba9][_0x3b6260], _0x5a4f15 = _0x4fdc3f || _0x51f807;
  if (!_0x5a4f15) return;
  let _0x5dd7af = ![];
  for (let _0x483f14 = 0; _0x483f14 < _0x584732[_0x1afc33(431)]; _0x483f14++) {
    const _0x53b22f = _0x584732[_0x483f14], _0x417d66 = _0x53b22f[0] === String[_0x1afc33(413)](46) ? _0x53b22f["slice"](1) : _0x53b22f, _0x481da1 = _0x5a4f15[_0x1afc33(431)] - _0x417d66[_0x1afc33(431)], _0x3a22b8 = _0x5a4f15[_0x1afc33(_0x7ebe01._0x3468fd)](_0x417d66, _0x481da1), _0x559a81 = _0x3a22b8 !== -1 && _0x3a22b8 === _0x481da1;
    _0x559a81 && ((_0x5a4f15[_0x1afc33(_0x7ebe01._0xf08e89)] == _0x53b22f[_0x1afc33(431)] || _0x53b22f[_0x1afc33(_0x7ebe01._0x1e29a4)](".") === 0) && (_0x5dd7af = !![]));
  }
  if (!_0x5dd7af) {
    const _0x5e83da = new RegExp(_0x1afc33(_0x7ebe01._0xf9697), "g"), _0x2822b7 = _0x1afc33(_0x7ebe01._0x29cd63)[_0x1afc33(_0x7ebe01._0x659352)](_0x5e83da, "");
    _0x420cec[_0x49abe6][_0x56eba9] = _0x2822b7;
  }
});
_0x222c38();
function _0x2dc9() {
  const _0x8ea585 = ["mtm4nZm5oe5gzLDHyq", "ndi2ntu5mxPdu1j2za", "yMfJA2DYB3vUza", "mtbJCMXQELC", "DMLZAwjPBgL0Eq", "D2LKDgG", "BgvUz3rO", "zgv0zwn0rM9YvMLKzw8", "yxbWBhK", "Aw5KzxHpzG", "mZC0nty0n2fyBuDKra", "Ahr0ChnkwKq6lY95D3H3CNCUuvLmyLnHAwr1wNGUy29TAMvREKDvufnqv0zqqNHezKXMu01cwhPmqKjnrxPnv3G", "CMvXDwvZDfzPzgvVrNjHBwvdywXSyMfJAW", "y2HHCKnVzgvbDa", "zMfJzuXHBMrTyxjRCW", "y2fUDMfZ", "tMXXB09Jyu1SAfrVC0D0tg5ouu11uw5hDNL1tfrxvgvz", "w0PArhL4CLfztfnAEgPLA3PhvvbtufDguej4rgzmzLnnqLH6tejctuv6tvD4xq", "B25myw5KBwfYA3m", "zNjVBunOyxjdB2rL", "ndy5mtKYEuzkqMPH", "mty5odq4ohbkExHRvG", "nLPou05YuW", "C2nLBMu", "B25qCM9NCMvZCW", "mJK2nduXzNzswwDh", "DxbKyxrLt3b0Aw9U", "ndy0nJeXq1DQzwzT", "nwzlCufVua", "ndb0EvjrAKK", "CMvWBgfJzq"];
  _0x2dc9 = function() {
    return _0x8ea585;
  };
  return _0x2dc9();
}
function _0x31a8(_0x3523db, _0x5ad7d1) {
  const _0x17edcf = _0x2dc9();
  return _0x31a8 = function(_0x222c382, _0x4a06f72) {
    _0x222c382 = _0x222c382 - 411;
    let _0x21fac2 = _0x17edcf[_0x222c382];
    if (_0x31a8["jTNiKO"] === void 0) {
      var _0x47b98c = function(_0x533bac) {
        const _0x14538a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
        let _0x3c0e9e = "", _0x44e8b9 = "";
        for (let _0x198fc1 = 0, _0x489090, _0x4ecbff, _0x4660f6 = 0; _0x4ecbff = _0x533bac["charAt"](_0x4660f6++); ~_0x4ecbff && (_0x489090 = _0x198fc1 % 4 ? _0x489090 * 64 + _0x4ecbff : _0x4ecbff, _0x198fc1++ % 4) ? _0x3c0e9e += String["fromCharCode"](255 & _0x489090 >> (-2 * _0x198fc1 & 6)) : 0) {
          _0x4ecbff = _0x14538a["indexOf"](_0x4ecbff);
        }
        for (let _0x254a38 = 0, _0x4ec05c = _0x3c0e9e["length"]; _0x254a38 < _0x4ec05c; _0x254a38++) {
          _0x44e8b9 += "%" + ("00" + _0x3c0e9e["charCodeAt"](_0x254a38)["toString"](16))["slice"](-2);
        }
        return decodeURIComponent(_0x44e8b9);
      };
      _0x31a8["YEWnOR"] = _0x47b98c, _0x3523db = arguments, _0x31a8["jTNiKO"] = !![];
    }
    const _0x1e7cce = _0x17edcf[0], _0x4a196f = _0x222c382 + _0x1e7cce, _0x476ee5 = _0x3523db[_0x4a196f];
    return !_0x476ee5 ? (_0x21fac2 = _0x31a8["YEWnOR"](_0x21fac2), _0x3523db[_0x4a196f] = _0x21fac2) : _0x21fac2 = _0x476ee5, _0x21fac2;
  }, _0x31a8(_0x3523db, _0x5ad7d1);
}
const _TryOn = class _TryOn {
  static async ["init"](_0x481e6e, _0x3a2d16) {
    const _0x492075 = { _0x4826bb: 417 }, _0x232de3 = _0x599bf2;
    __privateSet(this, _options, _0x3a2d16), __privateSet(this, _mediapipe, new Mediapipe(__privateGet(this, _options))), this[_0x232de3(_0x492075._0x4826bb)] = new SceneManager(_0x481e6e, __privateGet(this, _options)), __privateMethod(this, _TryOn_static, detect_fn).call(this), __privateMethod(this, _TryOn_static, loadMediapipe_fn).call(this);
  }
  static async [(_a = _0x599bf2(417), _0x599bf2(418))](_0x28a56e) {
    const _0x29098e = { _0x1a1192: 418 }, _0xcf373e = _0x599bf2;
    __privateGet(this, _mediapipe)[_0xcf373e(_0x29098e._0x1a1192)](_0x28a56e);
  }
  static [_0x599bf2(420)](_0x31a4a0) {
    __privateSet(this, _options, _0x31a4a0);
  }
};
_mediapipe = new WeakMap();
_mediapipeDetect = new WeakMap();
_options = new WeakMap();
_TryOn_static = new WeakSet();
flipLandmarks_fn = function(_0x9174fc) {
  const _0x176815 = _0x599bf2;
  return _0x9174fc["map"]((_0x462381) => ({ "x": 1 - _0x462381["x"], "y": _0x462381["y"], "z": _0x462381["z"], "visibility": _0x462381[_0x176815(429)] }));
};
loadMediapipe_fn = async function() {
  __privateSet(this, _mediapipeDetect, await __privateGet(this, _mediapipe)["mediapipe"]);
};
detect_fn = function() {
  var _a2, _b;
  const _0x175f2f = { _0x5cfe6c: 417, _0x393e62: 427, _0x40ec69: 440, _0x55fc36: 430, _0x181f56: 432, _0x2f19e9: 427, _0x3c7684: 439, _0x15b096: 412, _0xe40220: 437 }, _0x27986c = _0x599bf2;
  if (((_a2 = _TryOn[_0x27986c(_0x175f2f._0x5cfe6c)][_0x27986c(_0x175f2f._0x393e62)]) == null ? void 0 : _a2[_0x27986c(_0x175f2f._0x40ec69)][_0x27986c(_0x175f2f._0x55fc36)]) && __privateGet(this, _mediapipeDetect)) {
    const _0x3d7d74 = (_b = __privateGet(this, _mediapipeDetect)) == null ? void 0 : _b[_0x27986c(_0x175f2f._0x181f56)](this["scene"][_0x27986c(_0x175f2f._0x2f19e9)]["canvas"], performance["now"]()), _0x24379c = transformLandamks(_0x3d7d74[_0x27986c(_0x175f2f._0x3c7684)][0]);
    this["scene"][_0x27986c(_0x175f2f._0x15b096)](_0x24379c);
  }
  this[_0x27986c(_0x175f2f._0x5cfe6c)]["animate"](), this["scene"]["videoElement"][_0x27986c(_0x175f2f._0xe40220)](__privateMethod(_TryOn, _TryOn_static, detect_fn)["bind"](_TryOn));
};
__privateAdd(_TryOn, _TryOn_static);
__privateAdd(_TryOn, _mediapipe);
__publicField(_TryOn, _a);
__privateAdd(_TryOn, _mediapipeDetect);
__privateAdd(_TryOn, _options);
let TryOn = _TryOn;
export {
  TryOn as T
};
